package org.senRPC.example.generic.test_6;

import org.senRPC.client.provider.controler.DefaultProvider;
import org.senRPC.common.exception.remoting.RemotingException;
import org.senRPC.example.demo.service.HelloService_3;
import org.senRPC.remoting.config.NettyClientConfig;
import org.senRPC.remoting.config.NettyServerConfig;

public class ProviderTest_3 {

	public static void main(String[] args) throws InterruptedException, RemotingException {

		DefaultProvider defaultProvider = new DefaultProvider(new NettyClientConfig(), new NettyServerConfig());

		defaultProvider.registryAddress("127.0.0.1:18010") // 注册中心的地址
				.serviceListenPort(7001) // 暴露服务的端口
				.publishService(new HelloService_3()) // 暴露的服务
				.start(); // 启动服务

	}

}
